package com.spring.data.jpa.demo.web.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

@Controller
public class HelloWorld {

	@RequestMapping("/hello.do")
	public ModelAndView helloWorld() {
		ModelAndView modelAndView = new ModelAndView();
		modelAndView.setViewName("hello");

		String str = "MVC spring is here!";
		modelAndView.addObject("message", str);

		return modelAndView;
	}
}
